﻿using System;
using System.ComponentModel;
using System.Windows;
using ClimateControl.Manager.ViewModel;

namespace ClimateControl.Manager.View
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            DataContext = new MainViewModel();
            if (DataContext is IDisposable)
                Closed += (sender, e) => ((IDisposable)DataContext).Dispose();
        }
    }   
}
